test(intensity-histogram): vet the 21 untested IBSI IH dispersion/index features#367
Open
sameeul wants to merge 1 commit into
Open
test(intensity-histogram): vet the 21 untested IBSI IH dispersion/index features#367sameeul wants to merge 1 commit into
sameeul wants to merge 1 commit into
Conversation
…atures
The IBSI Intensity-Histogram family had 26 of its 47 features value-checked by
test_ih_integer_domain_values; the remaining 21 (7 "...Value" dispersion features
and 14 "...Index" variants) had no assertion at all — a coverage gap surfaced by
the test-suite vetting audit.
Add test_ih_dispersion_and_index_values covering all 21:
* MAD, robust-MAD, median-AD, interquantile range, coefficient of variation,
quantile coefficient of dispersion, robust mean ("...Value"), plus the
variance/skewness/kurtosis/range/entropy/uniformity/... "...Index" variants.
* Ground truth is derived independently from the IBSI first-order definitions
applied to the discretised N-bin histogram (not copied from the C++), so a
formula regression is caught rather than pinned.
* Two ROIs: the existing 5-px fixture (N=3, robust window covers all bins) and a
new 17-px fixture (N=5) whose [p10Index,p90Index] window strictly trims the two
tail bins, so the robust-mean / robust-MAD trimming path is genuinely exercised
(robust != full).
No production code changes — test-only.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
darkclad
approved these changes
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
test_ih_dispersion_and_index_values— value-check coverage for the 21 IBSIIntensity-Histogram (IH) features that previously had no assertion at all:
interquantile range, coefficient of variation, quantile coefficient of dispersion, robust mean.
range / MAD / robust-MAD / median-AD / CoV / QCoD / entropy / uniformity / robust-mean, over
the 1-based bin-index domain.
Test-only — no production code changes.
Why
A test-suite vetting audit found that
test_ih_integer_domain_valuescovered 26 of the 47IH features, but these 21 dispersion / index features were never checked. A regression in any
of them (or in the robust-window trimming) would have gone undetected.
How the ground truth is trustworthy
Ground truth is derived independently from the IBSI first-order definitions applied to the
discretised N-bin histogram — it is not copied from
intensity_histogram.cpp. So a formularegression fails the test rather than being silently pinned. For the "…Value" dispersion
features this is an oracle-grade check against the IBSI intensity-histogram definitions; the
"…Index" variants are the same statistics over the bin-index domain (Nyxus-specific) and are
pinned analytically.
Two ROIs are used so the robust window is exercised both degenerately and non-trivially:
[p10Idx, p90Idx]{1,1,3,5,7}{2,1,2}{0, 10×5, 20×6, 30×4, 40}{1,5,6,4,1}ROI-2 is specifically constructed so
robustMean/robust-MADdiffer from their full-rangecounterparts, giving the trimming path real coverage.
Verification
Ubuntu C++ GoogleTest CI is green:
The pass confirms nyxus's IH dispersion/index implementation agrees with the independently
derived IBSI definitions.
🤖 Generated with Claude Code